package serviceimpl;

import bean.UserLogin;
import dao.UserLoginMapper;
import org.apache.ibatis.session.SqlSession;
import service.LoginService;
import util.CreateSqlSession;

import java.io.IOException;

public class LoginServiceimpl implements LoginService {
    @Override
    public boolean isLogin(String username, String password) throws IOException {
        SqlSession sqlSession = CreateSqlSession.createSqlSession();
        UserLoginMapper userLoginMapper=sqlSession.getMapper(UserLoginMapper.class);
        //判断登录
        if(userLoginMapper.isLogin(username,password)!=null)
            return true;
        else
        return false;
    }
}
